<!doctype html>
<html>
  <head>
    <meta charset="UTF-8">
    <meta name="viewport" content="maximum-scale=1.0,minimum-scale=1.0,user-scalable=0,width=device-width,initial-scale=1.0"/>
    <title>Hello APP</title>
    <link rel="stylesheet" type="text/css" href="../../css/api.css" />
    <link rel="stylesheet" type="text/css" href="../../css/common.css" />
    
    <style>
     
     /* 头部样式 */
     .topbar {background: #FF8400; height:50px; border-bottom: 1px solid #DDDFE3;}
     .topbar_title {display: inline-block;font-size: 20px; line-height: 50px;padding-left: 12px;}
     .hr01, .hr02 {height: 28px;}
     .headerico {padding: 11px 15px 11px 15px;}
     .headericohover {background: #DADDE0;}
     .fr{float: right;}
     .fl{float: left;}
     
     /*第一头部*/
     #logo {padding: 11px 0 0 10px;height: 28px;}
     #citylist {height: 50px; line-height: 50px;padding-left: 15px; font-size: 18px; color: #fff;}
     .citylistarrow {vertical-align: top; width: 20px; padding-top: 15px;}
    .search {height: 34px;line-height: 34px; padding-left: 10px; border-radius: 30px;  margin-top: 8px; position: absolute; left: 20px; right: 60px;font-size: 14px;}
    .search img:first-child {vertical-align: top; width: 20px; padding-top: 7px;padding-right: 10px;}
    .search img:last-child {vertical-align: top; width: 20px; padding-top: 7px;}
    .firstSearch {left: 90px;right: 60px;background-color: #FA6604;color: #FDC29B;}

     /* 第二头部 */
     #topbar_refresh {width: 40px;padding:5px 10px;}
     .whitebar {background-color: #fcfcfc;}
     #whitecity {height: 50px; line-height: 50px;padding-left: 15px; font-size: 18px;color: #FF8400;}
    .secCitylistarrow {vertical-align: top; width: 15px; padding-top: 18px;padding-left: 5px;}
    .secSearch {left: 90px;right: 15px;background-color: #E8E8E8;color: #999;}

    /* 第三头部 */
    .swipepic {padding: 5px 15px 2px 15px;height: 23px;}
    .swipe div {font-size: 4px; text-align: center;color: #999;}
    .thrSearch {left: 50px;right: 60px;background-color: #E8E8E8;color: #999;}

     /* 头部切换样式 */
     .activebar {display: block;}
     
     /* 底部切换按钮样式 */
     ul {display: -webkit-box; display: -webkit-flex; display: flex; }
     #footer {height: 61px; line-height: 60px; background-color: #FAFAFA;border-top: 1px solid #FAFAFA; }
     #footer li{-webkit-box-flex: 1; -webkit-flex: 1; flex:1; height: 60px;}

     /* 选项卡样式 */
     .scrollbar {display: -webkit-box;display: -webkit-flex; text-align: center; height: 40px; line-height: 40px;background: #EBECF0;font-size: 12px;position: relative;}
     .col1 {-webkit-box-flex:1;-webkit-flex: 1;flex:1;color: #909090;}
     .indexbar {position: absolute;/*background: #0fc;*/width: 50%;height: 5px;left: 0px;bottom: 0px;-webkit-transition: 300ms;}
     .redbox {background: #DB4646;width: 40px;height: 5px;position: relative;left: auto;right: auto; margin-left: auto; margin-right: auto;}

    
     /* 本地刷新图标 */
     #localrefresh {display:none;float: right; width: 40px; padding: 5px 10px;}
     #field1::-webkit-input-placeholder { color:#666; }
     #field1 {height: 30px; line-height: 30px; width: 70%;}

     .swipe {line-height: 50px;margin-right: 10px;color: #FF8400;}
     .back {float: left; }
     .back img {height: 30px;margin-top: 10px;margin-left: 10px;}
     .topbar .title {line-height: 50px;text-align: center;font-size: 22px;}
    </style>
  </head>
  <body>
    <div id="wrap">
      <!-- 第三头部 -->
      <div id="thridHeader" class="titlebar">
        <div class="topbar whitebar">
          <div class="back"  tapmode="" onclick="goback()"><img src="../../image/ic_back_u.png" alt=""></div>
          <div class="title" id="title">通用设置</div>
        </div>
      </div>
    </div>
  </body>
  <script type="text/javascript" src="../../script/api.js"></script>
  <script type="text/javascript">
    function goback () {
      api.closeWin({name:'forthsub'});
    }

    // 完成首页初始化
    apiready = function(){
      var thridHeader = $api.byId('thridHeader');
      $api.fixIos7Bar(thridHeader);
      var thridHeader = $api.offset(thridHeader);

      var type = api.pageParam.name;
      
      if(type == 'setting')
      {
        api.openFrame ({
            name: 'forth_setting',
            url: './setting.html',
            rect:{
                x:0,
                y:thridHeader.h,
                w:'auto',
                h:'auto'
            },
            bounces: false,
            delay:200
        });
      }
      else if(type == 'myorder')
      {
        var title = $api.byId('title');
        title.innerHTML = '我的订单';
        
        api.openFrame ({
            name: 'forth_order',
            url: './myorder.html',
            rect:{
                x:0,
                y:thridHeader.h,
                w:'auto',
                h:'auto'
            },
            bounces: false,
            delay:200
        });
      }
      else{
        alert(type);
      }
    };
  </script>
</html>